package com.huanghuai.retail.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

@Data
@ToString
@ApiModel(value="addPORepositoryDto", description="新增出入库单")
public class AddPORepositoryDto {

    /**
     * 供应商id
     */
    @ApiModelProperty(value = "供应商id", required = true)
    private Long proId;

    /**
     * 仓库id
     */
    @ApiModelProperty(value = "仓库id", required = true)
    @NotNull(message = "仓库id不能为空")
    private Long repId;

    /**
     * 出入库时间
     */
//    @ApiModelProperty(value = "出入库时间", required = true)
//    @NotNull(message = "业务时间不能为空")
//    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "单据类型", required = true)
    @NotNull(message = "单据类型不能为空")
    private String billType;

    /**
     * 送货人id
     */
    @ApiModelProperty(value = "送货人id", required = true)
    private Long deliId;

    /**
     * 经手人id
     */
    @ApiModelProperty(value = "经手人id", required = true)
    private Long workerId;

    /**
     * 总金额
     */
    @ApiModelProperty(value = "总金额", required = true)
    @NotNull(message = "总金额不能为空")
    private Double totPrice;

    /**
     * 大写金额
     */
    @ApiModelProperty(value = "大写金额", required = true)
    @NotEmpty(message = "大写金额不能为空")
    private String bigTotPrice;

    /**
     * 描述
     */
    @ApiModelProperty(value = "描述", required = true)
    @NotEmpty(message = "描述不能为空")
    private String des;

    //出入单商品
    @ApiModelProperty(value = "出入单商品", required = true)
    @NotNull(message = "货品不能为空")
    private List<AddPOGoodsDto> poGoodsList;

}
